package com.zy.scwwebuis.service;

import com.zy.scwcommon.bean.AppResponse;
import com.zy.scwcommon.entity.TMember;
import com.zy.scwcommon.entity.TMemberAddress;
import com.zy.scwcommon.vo.user.UserAddressVo;
import com.zy.scwwebuis.service.exp.TMemberServiceFeignExceptionHandler;
import com.zy.scwwebuis.vo.resp.UserRespVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value="SCW-USER",fallback= TMemberServiceFeignExceptionHandler.class)
public interface TMemberServiceFeign {

	@PostMapping("/user/login")
	public AppResponse<UserRespVo> login(@RequestParam("loginacct") String loginacct, @RequestParam("userpswd") String password);

	@PostMapping("/user/info/selectById")
	public AppResponse<TMemberAddress> selectById(@RequestParam("id") Integer id);
	@GetMapping("/user/info/address1")
	public AppResponse<List<UserAddressVo>> address(@RequestParam("accessToken") String accessToken);
}
